/*
 * Copyright (c) 2020
 * User:Palo
 * File:FormAbilitySlice.java
 * Date:2020/12/26
 */

package com.iceframework.hiapp.slice;

import com.iceframework.hiapp.ResourceTable;
import com.iceframework.hiapp.core.utils.HiToastUtils;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;
import ohos.agp.components.Component;
import ohos.net.NetHandle;
import ohos.net.NetManager;
import ohos.net.NetStatusCallback;

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;

public class FormAbilitySlice extends AbilitySlice {

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_form);
        Button btn = (Button) findComponentById(ResourceTable.Id_form_button);
        btn.setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                terminate();
                HiToastUtils.showInfo(FormAbilitySlice.this,"保存成功",3000);
            }
        });
    }

}
